﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:views="clr-namespace:OMANE.Modules.TauxGarantis.Views"
    xmlns:ig="http://schemas.infragistics.com/xaml"
    xmlns:viewmodels="clr-namespace:OMANE.Modules.TauxGarantis.ViewModels"
	mc:Ignorable="d"
	x:Class="Views.ViewSynthese"
	d:DesignWidth="640" d:DesignHeight="480">
    <UserControl.Resources>
        <DropShadowEffect x:Key="SeriesEffect"
	                  ShadowDepth="1"
	                  BlurRadius="13"
	                  Opacity="0.3" />

        <SolidColorBrush x:Key="LowSeriesBrush"
	                 Color="#7F5A7914" />
        <SolidColorBrush x:Key="LowOutlineBrush"
	                 Color="#FF5A7914" />
        <SolidColorBrush x:Key="HighSeriesBrush"
	                 Color="#4C3B0147" />
        <SolidColorBrush x:Key="HighOutlineBrush"
	                 Color="#FF3B0147" />
        <SolidColorBrush x:Key="MediumSeriesBrush"
	                 Color="#7FD7A820" />
        <SolidColorBrush x:Key="MediumOutlineBrush"
	                 Color="#FFD7A820" />
        <RadialGradientBrush x:Key="MediumMarkerBrush"
	                     GradientOrigin="0.3,0.4">
            <GradientStop Color="#FFD7A820"
		              Offset="1" />
            <GradientStop Color="#FFEFD077" />
        </RadialGradientBrush>
        <RadialGradientBrush x:Key="LowMarkerBrush"
	                     GradientOrigin="0.3,0.4">
            <GradientStop Color="#FF5A7914"
		              Offset="1" />
            <GradientStop Color="#FF97B651" />
        </RadialGradientBrush>
        <RadialGradientBrush x:Key="HighMarkerBrush"
	                     GradientOrigin="0.3,0.4">
            <GradientStop Color="#FF3B0147"
		              Offset="1" />
            <GradientStop Color="#FF6B0880" />
        </RadialGradientBrush>

        <LinearGradientBrush x:Key="BackgroundBrush"
	                     EndPoint="0.5,1"
	                     MappingMode="RelativeToBoundingBox"
	                     StartPoint="0.5,0">
            <GradientStop Color="#FFE0E0E0"
		              Offset="1" />
            <GradientStop Color="White" />
        </LinearGradientBrush>
        <DropShadowEffect x:Key="Effect"
	                  ShadowDepth="1"
	                  BlurRadius="10"
	                  Opacity="0.6" />


        <SolidColorBrush x:Key="PositiveSeriesBrush"
	                 Color="#4C5A7914" />
        <SolidColorBrush x:Key="PositiveOutlineBrush"
	                 Color="#FF5A7914" />
        <SolidColorBrush x:Key="NegativeSeriesBrush"
	                 Color="#4C3B0147" />
        <SolidColorBrush x:Key="NegativeOutlineBrush"
	                 Color="#FF3B0147" />
        <SolidColorBrush x:Key="NeutralSeriesBrush"
	                 Color="#7F3264AD" />
        <SolidColorBrush x:Key="NeutralOutlineBrush"
	                 Color="#FF3264AD" />
        <RadialGradientBrush x:Key="NeutralMarkerBrush"
	                     GradientOrigin="0.3,0.4">
            <GradientStop Color="#FF3264AD"
		              Offset="1" />
            <GradientStop Color="#FF76A1E0" />
        </RadialGradientBrush>
        <RadialGradientBrush x:Key="PositiveMarkerBrush"
	                     GradientOrigin="0.3,0.4">
            <GradientStop Color="#FF5A7914"
		              Offset="1" />
            <GradientStop Color="#FF97B651" />
        </RadialGradientBrush>
        <RadialGradientBrush x:Key="NegativeMarkerBrush"
	                     GradientOrigin="0.3,0.4">
            <GradientStop Color="#FF3B0147"
		              Offset="1" />
            <GradientStop Color="#FF6B0880" />
        </RadialGradientBrush>

        <DataTemplate x:Key="MarkerTemplate">
            <Ellipse Stretch="Fill"
		         HorizontalAlignment="Stretch"
		         VerticalAlignment="Stretch"
		         Fill="{Binding ActualItemBrush}"
		         Stroke="{Binding Series.ActualMarkerOutline}"
		         StrokeThickness="0.5"
		         MinWidth="10"
		         MinHeight="10">
                <!--<Ellipse.Effect>
                        <DropShadowEffect ShadowDepth="1" BlurRadius="10"/>
                    </Ellipse.Effect>-->
            </Ellipse>
        </DataTemplate>
    </UserControl.Resources>
    <UserControl.DataContext>
        <viewmodels:ViewModelSynthese />
    </UserControl.DataContext>
    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <TextBlock 
		Text="Synthese de la sensibilite de l'esperance du S/P autour du scenario central"
		 HorizontalAlignment="Center"
		  FontSize="26.667"
		   FontWeight="Bold" 
		   TextWrapping="Wrap" TextAlignment="Center"  />
        <Border BorderBrush="#FF9F50F1" BorderThickness="3" Grid.Row="1" CornerRadius="10" Margin="5"  >
	    

         
            <Grid>
                <ig:XamDataChart x:Name="DataChart"
                     Legend="{Binding ElementName=legend}"
                     PlotAreaBackground="Transparent"
                     PlotAreaBorderBrush="Transparent">
                <ig:XamDataChart.Axes>

                    <ig:CategoryAngleAxis x:Name="angleAxis"
                              CrossingAxis="{Binding ElementName=radiusAxis}"
                              ItemsSource="{Binding Data}"
                              StartAngleOffset="0"
                              Interval="1"
                              Strip="Transparent"
                              Label="{}{Label}">
                        <ig:CategoryAngleAxis.LabelSettings>
                            <ig:AxisLabelSettings Location="InsideTop"
                                  Extent="10" />
                        </ig:CategoryAngleAxis.LabelSettings>
                    </ig:CategoryAngleAxis>

                    <ig:NumericRadiusAxis x:Name="radiusAxis"
                              MinimumValue="0"
                              Interval="{Binding Tick}"
                              CrossingAxis="{Binding ElementName=angleAxis}"
                              CrossingValue="0"
                              MaximumValue="{Binding Echelle}"
                              RadiusExtentScale="0.6"
                              Strip="Transparent">
                        <ig:NumericRadiusAxis.LabelSettings>
                            <ig:AxisLabelSettings Location="InsideTop"
                                  Extent="20" />
                        </ig:NumericRadiusAxis.LabelSettings>
                    </ig:NumericRadiusAxis>
                </ig:XamDataChart.Axes>

                <ig:XamDataChart.Series>


                    <ig:RadialAreaSeries Title="Schema 1"
                             Opacity="0.8"
                             AngleAxis="{Binding ElementName=angleAxis}"
                             ValueAxis="{Binding ElementName=radiusAxis}"
                             ValueMemberPath="Budget"
                             Brush="{StaticResource PositiveSeriesBrush}"
                             MarkerType="Circle"
                             MarkerBrush="{StaticResource LowMarkerBrush}"
                             MarkerTemplate="{StaticResource MarkerTemplate}"
                             ItemsSource="{Binding Data}"
                             Outline="{StaticResource PositiveOutlineBrush}"
                             Thickness="5">
                    </ig:RadialAreaSeries>



                </ig:XamDataChart.Series>

            </ig:XamDataChart>

            <StackPanel HorizontalAlignment="Left"
                Margin="10"
                VerticalAlignment="Top">
                <ig:Legend x:Name="legend"
                 Effect="{StaticResource Effect}"
                 Margin="0"
                 Padding="10,10,10,5">
                    <ig:Legend.Content>
                        <StackPanel>
                            <TextBlock Text="Legend" FontWeight="Bold"></TextBlock>
                        </StackPanel>
                    </ig:Legend.Content>
                </ig:Legend>
            </StackPanel>
            </Grid>
        </Border>
    </Grid>
</UserControl>